package com.zlfund.cat.zjgsmk.option;

import android.content.Context;

import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.annotation.GlideModule;
import com.bumptech.glide.load.engine.cache.LruResourceCache;
import com.bumptech.glide.module.AppGlideModule;

/**
 * Created by chenj
 * Created on 2017/8/15
 */

@GlideModule
public class ZGlideModule extends AppGlideModule {
    private final int MAX_MEMORY_SIZE = 20 * 1024 * 1024;
//    private final int MAX_DISK_MEMORY_SIZE = 100 * 1024 * 1024;

    @Override
    public boolean isManifestParsingEnabled() {
        return false;
    }

    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        super.applyOptions(context, builder);
        builder.setMemoryCache(new LruResourceCache(MAX_MEMORY_SIZE));
    }
}
